package com.ss.android.article.base.app.setting;

import android.content.SharedPreferences;
import android.content.SharedPreferences;
import android.support.annotation.Keep;
import android.text.TextUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

@Keep public class AppSettings$$Impl extends AppSettings {
    public AppSettings$$Impl() {

    }

    private boolean jsonEquals(Object arg4, Object arg5) {
        int v0 = 1;
        if(arg4 != arg5) {
            int v2 = arg4 == null ? 1 : 0;
            if(arg5 != null) {
                v0 = 0;
            }

            if((v0 ^ v2) != 0) {
                return false;
            }

            return arg4.toString().equals(arg5.toString());
        }
        return v0 == 1;
    }

    public void loadData(SharedPreferences arg7) {
        long v4 = 0;
        super.loadData(arg7);
        this.mShowRefreshButton = arg7.getInt("is_refresh_button_shown", 1);
        this.mWapMonitorSeconds = arg7.getInt("wap_blank_monitor_seconds", 0);
        this.mDisableDetailWebViewAnimation = arg7.getInt("disable_detail_web_view_animation", 0);
        this.mDisableDetailFragmentPreload = arg7.getInt("disable_detail_fragment_preload", 0);
        this.mUploadContactControl = arg7.getLong("contacts_collect_version", v4);
        this.mRequestMobileDelay = arg7.getInt("get_mobile_delay", 0);
        String v0 = arg7.getString("login_entry_list", "");
        if(!TextUtils.isEmpty(((CharSequence)v0))) {
            try {
                this.mThirdPartyLoginConfig = new JSONArray(v0);
            }
            catch(JSONException v0_1) {
            }
        }

        this.mDisableDelayFinish = arg7.getInt("disable_delay_finish", 0);
        this.mDisableDetail302Check = arg7.getInt("disable_detail_302_check", 0);
        this.mLargeImageDialogController = arg7.getInt("large_image_dialog_repeat_enabled", 1);
        this.mH5Settings = arg7.getString("h5_settings", "");
        this.mPlayVideoInFeed = arg7.getInt("tt_lite_play_video_in_feed", 0);
        this.mSingleImageGravityChange = arg7.getInt("tt_lite_single_image_gravity", 0);
        this.mFeedCellSpacingChange = arg7.getInt("tt_lite_feed_cell_spacing", 1);
        this.mVideoCellChange = arg7.getInt("tt_lite_video_cell_spacing", 1);
        this.mSubChannelItem = arg7.getInt("tt_lite_sub_channel", 0);
        this.mPreloadFeed = arg7.getInt("preload_feed", 1);
        this.mLaunchDelayTime = arg7.getLong("tt_launch_delay_time", v4);
        this.mSafeDomainListString = arg7.getString("tt_safe_domain_list", "");
        this.mTTEngineEnable = arg7.getInt("tt_lite_ttengine_enable", 0);
        this.mTTPlayerEnable = arg7.getInt("tt_lite_ttplayer_enable", 0);
        this.mTTPlayerIPEnable = arg7.getInt("tt_lite_ttplayer_inter_process_enable", 0);
        this.mRefreshStrategy = arg7.getInt("tt_lite_refresh_strategy", 0);
        v0 = arg7.getString("tt_landing_page_scheme_white_list", "");
        if(!TextUtils.isEmpty(((CharSequence)v0))) {
            try {
                this.mAllowedSchemeArray = new JSONArray(v0);
            }
            catch(JSONException v0_1) {
            }
        }

        this.mLockscreenEnable = arg7.getInt("tt_majia_lockscreen_enable", 0);
    }

    public void saveData(SharedPreferences.Editor arg5) {
        super.saveData(arg5);
        arg5.putInt("is_refresh_button_shown", this.mShowRefreshButton);
        arg5.putInt("wap_blank_monitor_seconds", this.mWapMonitorSeconds);
        arg5.putInt("disable_detail_web_view_animation", this.mDisableDetailWebViewAnimation);
        arg5.putInt("disable_detail_fragment_preload", this.mDisableDetailFragmentPreload);
        arg5.putLong("contacts_collect_version", this.mUploadContactControl);
        arg5.putInt("get_mobile_delay", this.mRequestMobileDelay);
        String v1 = "login_entry_list";
        String v0 = this.mThirdPartyLoginConfig == null ? "" : this.mThirdPartyLoginConfig.toString();
        arg5.putString(v1, v0);
        arg5.putInt("disable_delay_finish", this.mDisableDelayFinish);
        arg5.putInt("disable_detail_302_check", this.mDisableDetail302Check);
        arg5.putInt("large_image_dialog_repeat_enabled", this.mLargeImageDialogController);
        arg5.putString("h5_settings", this.mH5Settings);
        arg5.putInt("tt_lite_play_video_in_feed", this.mPlayVideoInFeed);
        arg5.putInt("tt_lite_single_image_gravity", this.mSingleImageGravityChange);
        arg5.putInt("tt_lite_feed_cell_spacing", this.mFeedCellSpacingChange);
        arg5.putInt("tt_lite_video_cell_spacing", this.mVideoCellChange);
        arg5.putInt("tt_lite_sub_channel", this.mSubChannelItem);
        arg5.putInt("preload_feed", this.mPreloadFeed);
        arg5.putLong("tt_launch_delay_time", this.mLaunchDelayTime);
        arg5.putString("tt_safe_domain_list", this.mSafeDomainListString);
        arg5.putInt("tt_lite_ttengine_enable", this.mTTEngineEnable);
        arg5.putInt("tt_lite_ttplayer_enable", this.mTTPlayerEnable);
        arg5.putInt("tt_lite_ttplayer_inter_process_enable", this.mTTPlayerIPEnable);
        arg5.putInt("tt_lite_refresh_strategy", this.mRefreshStrategy);
        v1 = "tt_landing_page_scheme_white_list";
        v0 = this.mAllowedSchemeArray == null ? "" : this.mAllowedSchemeArray.toString();
        arg5.putString(v1, v0);
        arg5.putInt("tt_majia_lockscreen_enable", this.mLockscreenEnable);
    }

    public boolean tryUpdateAppSetting(JSONObject arg7) {
        String v2_3;
        JSONArray v2_2;
        long v2_1;
        int v2;
        boolean v0 = super.tryUpdateAppSetting(arg7);
        if(arg7.has("is_refresh_button_shown")) {
            v2 = arg7.optInt("is_refresh_button_shown");
            if(v2 != this.mShowRefreshButton) {
                this.mShowRefreshButton = v2;
                v0 = true;
            }
        }

        if(arg7.has("wap_blank_monitor_seconds")) {
            v2 = arg7.optInt("wap_blank_monitor_seconds");
            if(v2 != this.mWapMonitorSeconds) {
                this.mWapMonitorSeconds = v2;
                v0 = true;
            }
        }

        if(arg7.has("disable_detail_web_view_animation")) {
            v2 = arg7.optInt("disable_detail_web_view_animation");
            if(v2 != this.mDisableDetailWebViewAnimation) {
                this.mDisableDetailWebViewAnimation = v2;
                v0 = true;
            }
        }

        if(arg7.has("disable_detail_fragment_preload")) {
            v2 = arg7.optInt("disable_detail_fragment_preload");
            if(v2 != this.mDisableDetailFragmentPreload) {
                this.mDisableDetailFragmentPreload = v2;
                v0 = true;
            }
        }

        if(arg7.has("contacts_collect_version")) {
            v2_1 = arg7.optLong("contacts_collect_version");
            if(v2_1 != this.mUploadContactControl) {
                this.mUploadContactControl = v2_1;
                v0 = true;
            }
        }

        if(arg7.has("get_mobile_delay")) {
            v2 = arg7.optInt("get_mobile_delay");
            if(v2 != this.mRequestMobileDelay) {
                this.mRequestMobileDelay = v2;
                v0 = true;
            }
        }

        if(arg7.has("login_entry_list")) {
            v2_2 = arg7.optJSONArray("login_entry_list");
            if(!this.jsonEquals(v2_2, this.mThirdPartyLoginConfig)) {
                this.mThirdPartyLoginConfig = v2_2;
                v0 = true;
            }
        }

        if(arg7.has("disable_delay_finish")) {
            v2 = arg7.optInt("disable_delay_finish");
            if(v2 != this.mDisableDelayFinish) {
                this.mDisableDelayFinish = v2;
                v0 = true;
            }
        }

        if(arg7.has("disable_detail_302_check")) {
            v2 = arg7.optInt("disable_detail_302_check");
            if(v2 != this.mDisableDetail302Check) {
                this.mDisableDetail302Check = v2;
                v0 = true;
            }
        }

        if(arg7.has("large_image_dialog_repeat_enabled")) {
            v2 = arg7.optInt("large_image_dialog_repeat_enabled");
            if(v2 != this.mLargeImageDialogController) {
                this.mLargeImageDialogController = v2;
                v0 = true;
            }
        }

        if(arg7.has("first_refresh_tips")) {
            v2 = arg7.optInt("first_refresh_tips");
            if(v2 != this.mFirstRefreshTips) {
                this.mFirstRefreshTips = v2;
                v0 = true;
            }
        }

        if(arg7.has("first_refresh_tips_interval")) {
            v2 = arg7.optInt("first_refresh_tips_interval");
            if(v2 != this.mFirstRefreshTipsInterval) {
                this.mFirstRefreshTipsInterval = v2;
                v0 = true;
            }
        }

        if(arg7.has("h5_settings")) {
            v2_3 = arg7.optString("h5_settings");
            if(!v2_3.equals(this.mH5Settings)) {
                this.mH5Settings = v2_3;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_play_video_in_feed")) {
            v2 = arg7.optInt("tt_lite_play_video_in_feed");
            if(v2 != this.mPlayVideoInFeed) {
                this.mPlayVideoInFeed = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_single_image_gravity")) {
            v2 = arg7.optInt("tt_lite_single_image_gravity");
            if(v2 != this.mSingleImageGravityChange) {
                this.mSingleImageGravityChange = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_feed_cell_spacing")) {
            v2 = arg7.optInt("tt_lite_feed_cell_spacing");
            if(v2 != this.mFeedCellSpacingChange) {
                this.mFeedCellSpacingChange = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_video_cell_spacing")) {
            v2 = arg7.optInt("tt_lite_video_cell_spacing");
            if(v2 != this.mVideoCellChange) {
                this.mVideoCellChange = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_sub_channel")) {
            v2 = arg7.optInt("tt_lite_sub_channel");
            if(v2 != this.mSubChannelItem) {
                this.mSubChannelItem = v2;
                v0 = true;
            }
        }

        if(arg7.has("preload_feed")) {
            v2 = arg7.optInt("preload_feed");
            if(v2 != this.mPreloadFeed) {
                this.mPreloadFeed = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_launch_delay_time")) {
            v2_1 = arg7.optLong("tt_launch_delay_time");
            if(v2_1 != this.mLaunchDelayTime) {
                this.mLaunchDelayTime = v2_1;
                v0 = true;
            }
        }

        if(arg7.has("tt_safe_domain_list")) {
            v2_3 = arg7.optString("tt_safe_domain_list");
            if(!v2_3.equals(this.mSafeDomainListString)) {
                this.mSafeDomainListString = v2_3;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_ttengine_enable")) {
            v2 = arg7.optInt("tt_lite_ttengine_enable");
            if(v2 != this.mTTEngineEnable) {
                this.mTTEngineEnable = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_ttplayer_enable")) {
            v2 = arg7.optInt("tt_lite_ttplayer_enable");
            if(v2 != this.mTTPlayerEnable) {
                this.mTTPlayerEnable = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_ttplayer_inter_process_enable")) {
            v2 = arg7.optInt("tt_lite_ttplayer_inter_process_enable");
            if(v2 != this.mTTPlayerIPEnable) {
                this.mTTPlayerIPEnable = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_lite_refresh_strategy")) {
            v2 = arg7.optInt("tt_lite_refresh_strategy");
            if(v2 != this.mRefreshStrategy) {
                this.mRefreshStrategy = v2;
                v0 = true;
            }
        }

        if(arg7.has("tt_landing_page_scheme_white_list")) {
            v2_2 = arg7.optJSONArray("tt_landing_page_scheme_white_list");
            if(!this.jsonEquals(v2_2, this.mAllowedSchemeArray)) {
                this.mAllowedSchemeArray = v2_2;
                v0 = true;
            }
        }

        if(arg7.has("tt_majia_lockscreen_enable")) {
            v2 = arg7.optInt("tt_majia_lockscreen_enable");
            if(v2 != this.mLockscreenEnable) {
                this.mLockscreenEnable = v2;
                v0 = true;
            }
        }

        return v0;
    }
}

